﻿using System;
using System.Collections.Generic;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;

namespace System.Drawing
{
    public static class ImageExtensions
    {
        public static bool IsJpeg(this Image image)
        {
            return (image.RawFormat.Guid == ImageFormat.Jpeg.Guid);
        }

        public static bool IsPng(this Image image)
        {
            return (image.RawFormat.Guid == ImageFormat.Png.Guid);
        }

        public static bool IsBmp(this Image image)
        {
            return (image.RawFormat.Guid == ImageFormat.Bmp.Guid);
        }

        public static bool IsGif(this Image image)
        {
            return (image.RawFormat.Guid == ImageFormat.Gif.Guid);
        }
    }
}